/**
 * 
 */
package t4j.concurrency;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @author sz
 *
 * create time：2013-3-4
 */
public class AtomicEvenGenerator extends IntGenerator{

	private AtomicInteger currentEvenValue = new AtomicInteger(0);
	
	@Override
	public int next() {
		return currentEvenValue.addAndGet(2);
	}
	
	public static void main(String[] args) {
		EvenChecker.test(new AtomicEvenGenerator());
	}

}
